<%@ page language="java" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@ include file="/common/meta.jsp"%>
</head>
<body>
	<table width="60%" border="1" cellpadding="0" align="center">
		<thead>
			<tr>
				<th style="cursor: hand;" title="按姓名进行排序" onclick="sortPage('name')"
					valign="top">姓名</th>
				<th style="cursor: hand;" title="按年龄进行排序" onclick="sortPage('age')"
					valign="top">年龄</th>
				<th style="cursor: hand;" title="按性别进行排序" onclick="sortPage('sex')"
					valign="top">性别</th>
				<th style="cursor: hand;" title="按地址进行排序"
					onclick="sortPage('address')" valign="top">地址</th>
				<th style="cursor: hand;">操作</th>
			</tr>
		</thead>
		<tbody>

			<c:forEach items="${userList}" var="user">
				<tr align="center">
					<td>${user.name}</td>
					<td>${user.age}</td>
					<td>${user.sex eq 1 ? "男" : user.sex eq 2 ? "女" : "未知"}</td>
					<td>${user.address}</td>
					<td><a
						href="${ctx}/user/toAdd.do">添加</a>
						| <a
						href="${ctx}/user/get/${user.id}.do">编辑</a>
						| <a
						href="${ctx}/user/del/${user.id}.do">删除</a>
					</td>
				</tr>
			</c:forEach>


		</tbody>
	</table>
	<br>
	<a href="${ctx}/index.jsp">返回</a>
</body>
</html>
